#include <cstdio>
/*
int main(int argc, char const *argv[]) {
    int num1, num2;
    while (scanf("%d%d", &num1, &num2) != EOF) {
        int buf_data_1[20], buf_data_2[20], size1 = 0, size2 = 0;
        while (num1 != 0) {
            buf_data_1[size1++] = num1 % 10;
            num1 /= 10;
        }
        while (num2 != 0) {
            buf_data_2[size2++] = num2 % 10;
            num2 /= 10;
        }
        int result = 0;
        for (int i = 0; i < size1; ++i) {
            for (int j = 0; j < size2; ++j)
                result += buf_data_1[i] * buf_data_2[j];
        }
        printf("%d\n", result);
    }
    return 0;
}
*/
int main(int argc, char const *argv[]) {
    char buf_data_1[11], buf_data_2[11];
    while (scanf("%s%s", buf_data_1, buf_data_2) != EOF) {
        int result = 0;
        for (int i = 0; buf_data_1[i] != '\0'; ++i) {
            for (int j = 0; buf_data_2[j] != '\0'; ++j)
                result += (buf_data_1[i] - '0') * (buf_data_2[j] - '0');
        }
        printf("%d\n", result);
    }
    return 0;
}